<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: LocalizationSimplified</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">LocalizationSimplified</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/lib/lang_cf_rb.html">
                lib/lang_cf.rb
                </a>
        <br />
                <a href="../files/lib/lang_chef_rb.html">
                lib/lang_chef.rb
                </a>
        <br />
                <a href="../files/lib/lang_da_rb.html">
                lib/lang_da.rb
                </a>
        <br />
                <a href="../files/lib/lang_de_rb.html">
                lib/lang_de.rb
                </a>
        <br />
                <a href="../files/lib/lang_en_rb.html">
                lib/lang_en.rb
                </a>
        <br />
                <a href="../files/lib/lang_es_rb.html">
                lib/lang_es.rb
                </a>
        <br />
                <a href="../files/lib/lang_es_ar_rb.html">
                lib/lang_es_ar.rb
                </a>
        <br />
                <a href="../files/lib/lang_fi_rb.html">
                lib/lang_fi.rb
                </a>
        <br />
                <a href="../files/lib/lang_fr_rb.html">
                lib/lang_fr.rb
                </a>
        <br />
                <a href="../files/lib/lang_it_rb.html">
                lib/lang_it.rb
                </a>
        <br />
                <a href="../files/lib/lang_ko_rb.html">
                lib/lang_ko.rb
                </a>
        <br />
                <a href="../files/lib/lang_nl_rb.html">
                lib/lang_nl.rb
                </a>
        <br />
                <a href="../files/lib/lang_pirate_rb.html">
                lib/lang_pirate.rb
                </a>
        <br />
                <a href="../files/lib/lang_se_rb.html">
                lib/lang_se.rb
                </a>
        <br />
                <a href="../files/lib/lang_zh_cn_rb.html">
                lib/lang_zh_cn.rb
                </a>
        <br />
                <a href="../files/lib/localization_simplified_rb.html">
                lib/localization_simplified.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
<a href="LocalizationSimplified.html">LocalizationSimplified</a>
(L10n-simplified) Really simple localization for Rails By Jesper
Rønn-Jensen ( <a href="http://justaddwater.dk">justaddwater.dk</a>/ )
Plugin available at <a
href="http://rubyforge.org/projects/l10n-simplified">rubyforge.org/projects/l10n-simplified</a>/
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000013">localize_strftime</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">

    <div id="class-list">
      <h3 class="section-bar">Classes and Modules</h3>

      Class <a href="LocalizationSimplified/ActiveRecord.html" class="link">LocalizationSimplified::ActiveRecord</a><br />
Class <a href="LocalizationSimplified/ArrayHelper.html" class="link">LocalizationSimplified::ArrayHelper</a><br />
Class <a href="LocalizationSimplified/DateHelper.html" class="link">LocalizationSimplified::DateHelper</a><br />
Class <a href="LocalizationSimplified/NumberHelper.html" class="link">LocalizationSimplified::NumberHelper</a><br />

    </div>

    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;cf&quot;,     :updated =&gt; &quot;2006-09-07&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;chef&quot;,     :updated =&gt; &quot;2006-09-07&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;da&quot;,     :updated =&gt; &quot;2006-09-07&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;de&quot;,     :updated =&gt; &quot;2006-09-28&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;en&quot;,     :updated =&gt; &quot;2006-09-01&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;es&quot;,     :updated =&gt; &quot;2006-10-03&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;es-ar&quot;,     :updated =&gt; &quot;2006-10-03&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;fi&quot;,     :updated =&gt; &quot;2006-09-07&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;fr&quot;,     :updated =&gt; &quot;2006-09-07&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;it&quot;,     :updated =&gt; &quot;2006-09-16&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;ko&quot;,     :updated =&gt; &quot;2006-09-29&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;nl&quot;,     :updated =&gt; &quot;2006-08-23&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;pirate&quot;,     :updated =&gt; &quot;2006-09-07&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;se&quot;,     :updated =&gt; &quot;2006-09-07&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">About</td>
          <td>=</td>
          <td class="context-item-value">{     :lang =&gt; &quot;zh_cn&quot;,     :updated =&gt; &quot;2007-06-06&quot;</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">Translations</td>
          <td>=</td>
          <td class="context-item-value">{     &quot;Editing %s&quot; =&gt; &quot;正在编辑%s&quot;,     &quot;New %s&quot; =&gt; &quot;新建%s&quot;,     &quot;Listing %s&quot; =&gt; &quot;%s列表&quot;,     &quot;View&quot; =&gt; &quot;查看&quot;,     &quot;Back&quot; =&gt; &quot;返回&quot;,     &quot;New&quot; =&gt; &quot;新建&quot;,     &quot;Edit&quot; =&gt; &quot;编辑&quot;,     &quot;Update&quot; =&gt; &quot;更新&quot;,     &quot;Create&quot; =&gt; &quot;创建&quot;,     &quot;Are you sure?&quot; =&gt; &quot;确认删除？&quot;,     &quot;Destroy&quot; =&gt; &quot;删除&quot;,     &quot;%s was successfully created.&quot; =&gt; &quot;成功创建%s。&quot;,     &quot;%s was successfully updated.&quot; =&gt; &quot;成功更新%s。&quot;</td>
        </tr>
        </table>
      </div>
    </div>



      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000013" class="method-detail">
        <a name="M000013"></a>

        <div class="method-heading">
          <a href="#M000013" class="method-signature">
          <span class="method-name">localize_strftime</span><span class="method-args">(date='%d.%m.%Y', time='')</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
substitute all daynames and monthnames with localized names from RUtils
plugin
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000013-source">
<pre>
    <span class="ruby-comment cmt"># File lib/localization_simplified.rb, line 10</span>
10:   <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">localize_strftime</span>(<span class="ruby-identifier">date</span>=<span class="ruby-value str">'%d.%m.%Y'</span>, <span class="ruby-identifier">time</span>=<span class="ruby-value str">''</span>)
11:     <span class="ruby-identifier">date</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/%%/</span>, <span class="ruby-ivar">@@ignore</span>)
12:     <span class="ruby-identifier">date</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/%a/</span>, <span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">DateHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">AbbrDaynames</span>[<span class="ruby-identifier">time</span>.<span class="ruby-identifier">wday</span>])
13:     <span class="ruby-identifier">date</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/%A/</span>, <span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">DateHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">Daynames</span>[<span class="ruby-identifier">time</span>.<span class="ruby-identifier">wday</span>])
14:     <span class="ruby-identifier">date</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/%b/</span>, <span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">DateHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">AbbrMonthnames</span>[<span class="ruby-identifier">time</span>.<span class="ruby-identifier">mon</span>])
15:     <span class="ruby-identifier">date</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/%B/</span>, <span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">DateHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">Monthnames</span>[<span class="ruby-identifier">time</span>.<span class="ruby-identifier">mon</span>])
16:     <span class="ruby-identifier">date</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-ivar">@@ignore</span>, <span class="ruby-value str">'%%'</span>)
17:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>